package org.gourpg.model.role;

/**
 * 角色与机构关系配置实体
 */
public class RoleOrgRel {
    /**
     * 角色ID，角色的主键
     */
    private Integer roleId;

    /**
     * 组织ID，组织的主键
     */
    private Integer orgId;

    public RoleOrgRel() {
    }

    public Integer getRoleId() {
        return this.roleId;
    }

    public Integer getOrgId() {
        return this.orgId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof RoleOrgRel)) return false;
        final RoleOrgRel other = (RoleOrgRel) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$roleId = this.getRoleId();
        final Object other$roleId = other.getRoleId();
        if (this$roleId == null ? other$roleId != null : !this$roleId.equals(other$roleId)) return false;
        final Object this$orgId = this.getOrgId();
        final Object other$orgId = other.getOrgId();
        if (this$orgId == null ? other$orgId != null : !this$orgId.equals(other$orgId)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RoleOrgRel;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $roleId = this.getRoleId();
        result = result * PRIME + ($roleId == null ? 43 : $roleId.hashCode());
        final Object $orgId = this.getOrgId();
        result = result * PRIME + ($orgId == null ? 43 : $orgId.hashCode());
        return result;
    }

    public String toString() {
        return "RoleOrgRel(roleId=" + this.getRoleId() + ", orgId=" + this.getOrgId() + ")";
    }
}
